<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
	<title>swagger-mg-ui</title>
	<link rel="shortcut icon" href="webjars/mg-ui/img/api.ico"/>
	<link rel="stylesheet" href="webjars/zui/css/zui.min.css" />
	<link rel="stylesheet" href="webjars/zui/lib/dashboard/zui.dashboard.min.css" />
	<link rel="stylesheet" href="webjars/mg-ui/css/mg-ui.css" />
</head>
<body>
	<div class="left-body" id="leftContent">
		<div class="left-header">
			<span class="logo" id="logoText">swagger-mg-ui</span>
			<i class="icon icon-bars" id="changeContentWidth"></i>
		</div>
		<div class="scrollbar-hover left-container">
			<!-- 样式类可选：tree-menu tree-folders tree-chevrons tree-angles -->
			<ul class="tree tree-lines tree-menu projects">
				<li>
					<div class="input-group">
						<input type="text" class="form-control" id="searchDocInput">
						<span class="input-group-btn">
							<button class="btn btn-default" type="button" id="searchDocBt">搜索</button>
						</span>
					</div>
				</li>
				<li id="homePageLi"><a href="javascript:void(0)" path=""><i class="icon-home"></i> 控制台</a></li>
				<li id="onlineDebugLi" class="local-storage"><a href="javascript:void(0)" path=""><i class="icon-bug"></i> 在线调试管理</a></li>
			</ul>
			<div id="apiPathTree">
				<ul class="tree tree-lines projects"></ul>
			</div>
		</div>
	</div>
	<div id="resizebleLeftRight" class="ui-resizable-handle mgresizebleW"></div>
	<div class="right-container" id="rightContent">
		<div class="tab-page tab-home-page">
			<div id="homePageDashboard" class="dashboard dashboard-draggable" data-height="320">
				<section class="row">
					<div class="col-md-6 col-sm-6">
						<div class="panel" data-id="1">
							<div class="panel-heading">
								<div class="title">配置中心</div>
							</div>
							<div class="panel-body">
								<div class="content">
									<table class="table table-bordered setting-table">
										<tr>
											<td class="info">目录展示方式</td>
											<td>
												<label><input type="radio" name="catalogShowType" value="1">分路径展示</label>
												<label><input type="radio" name="catalogShowType" value="2">分标签展示</label>
											</td>
										</tr>
										<tr>
											<td class="info">树形菜单展示方式</td>
											<td>
												<label><input type="radio" name="treeShowType" value="1">直角</label>
												<label><input type="radio" name="treeShowType" value="2">导航</label>
												<label><input type="radio" name="treeShowType" value="3">加减</label>
												<label><input type="radio" name="treeShowType" value="4">文件夹</label>
												<label><input type="radio" name="treeShowType" value="5">V型</label>
											</td>
										</tr>
										<tr>
											<td class="info">是否展示字段的类型</td>
											<td>
												<label><input type="radio" name="showParamType" value="1">是</label>
												<label><input type="radio" name="showParamType" value="0">否</label>
											</td>
										</tr>
										<tr>
											<td class="info">仅使用上次请求参数<i class="icon icon-info-sign" title="每个接口都使用最后一次请求的header、form、body参数，参数列表有的字段但上一次请求没有使用的则不会展示在请求参数里面，从未请求过则展示所有参数"></i></td>
											<td>
												<label><input type="radio" name="onlyUseLastParam" value="1">是</label>
												<label><input type="radio" name="onlyUseLastParam" value="0">否</label>
											</td>
										</tr>
										<tr>
											<td class="info">自动填充请求参数</td>
											<td>
												<label><input type="radio" name="autoFillParam" value="0">否</label>
												<label><input type="radio" name="autoFillParam" value="1">智能填充</label>
												<label><input type="radio" name="autoFillParam" value="2">全部填充</label>
											</td>
										</tr>
										<tr>
											<td class="info">文档管理</td>
											<td>
												<button type="button" class="btn btn-sm" data-moveable="true" id="addNewDocument">增加文档</button>
												<button type="button" class="btn btn-sm btn-primary" data-moveable="true" id="exportDocument">导出文档</button>
											</td>
										</tr>
										<tr>
											<td class="info">配置管理</td>
											<td>
												<button class="btn btn-sm" type="button" data-moveable="true" id="exportSetting">导出配置</button>
												<button class="btn btn-sm" type="button" data-moveable="true" id="importSetting">导入配置</button>
												<button class="btn btn-sm" type="button" id="restoreDefault">恢复默认</button>
											</td>
										</tr>
										<tr>
											<td colspan="2">
												<div align="center">简介</div>
												swagger-mg-ui是swagger-ui的一个前端实现，使用简单、解析速度快、走心的设计，
												支持多项目同时展示，多种文档目录的展示方案，多种自定义配置，满足各种使用习惯。
												本项目是完全从头写的，所以有任何属性未解析到、UI上有何建议都能及时处理得到。
												使用中您有任何的意见和建议都可到源码地址处反馈哦！<br/>
												源码地址：<a target="_blank" href="https://gitee.com/zyplayer/swagger-mg-ui">swagger-mg-ui</a>，
												前端框架：<a target="_blank" href="http://zui.sexy">zui</a>，
												我的网站：<a target="_blank" href="http://kongjianzhou.com">空间轴</a>
											</td>
										</tr>
									</table>
								</div>
							</div>
						</div>
					</div>
				</section>
			</div>
		</div>
		<!-- 在线调试配置 -->
		<div class="tab-page tab-online-debug-page hide">
			<div class="title-info">
				<div class="text">
				每次点击在线调试的发送请求后，都会默认保存一次请求的form、header、body数据到网页的本地存储中，以备下次使用，在此页面可以管理这些数据。
				一般浏览都有5M左右存储空间，如果存储过多有可能会导致部分功能异常，请随时清理一下不再使用的。
				</div>
				<button class="btn btn-primary refresh" type="button"><i class="icon icon-refresh"></i> 刷新</button>
				<button class="btn btn-primary expand-all" type="button"><i class="icon icon-expand-full"></i> 全部展开</button>
				<button class="btn btn-primary collapse-all" type="button"><i class="icon icon-collapse-full"></i> 全部收起</button>
				<button class="btn btn-danger del-all-param" type="button"><i class="icon icon-remove-sign"></i> 全部删除</button>
			</div>
			<table class="table table-bordered" id="onlineDebugParamTable">
				<thead>
					<tr><th>接口地址</th><th>参数配置</th><th>操作</th></tr>
				</thead>
				<tbody></tbody>
			</table>
		</div>
		<div class="tab-page tab-document hide">
			<ul class="nav nav-tabs">
				<li class="active"><a data-tab href="#tabDocInfo">接口说明</a></li>
				<li><a data-tab href="#tabOnlineDebug">在线调试</a></li>
				<li><a data-tab href="#tabSimulationResult">模拟返回</a></li>
			</ul>
			<div class="tab-content">
				<div class="tab-pane tab-document-pane active" id="tabDocInfo">
					<table class="table table-bordered doc-table">
						<tr>
							<td class="info">接口地址</td>
							<td><span id="docUrl" class="label label-warning"></span></td>
						</tr>
						<tr>
							<td class="info">说明</td>
							<td id="docInfo"></td>
						</tr>
						<tr>
							<td class="info">请求方式</td>
							<td><span id="docRequestMethod" class="label label-warning"></span></td>
						</tr>
						<tr>
							<td class="info">consumes</td>
							<td><span id="docConsumes" class="label label-warning"></span></td>
						</tr>
						<tr>
							<td class="info">produces</td>
							<td><span id="docProduces" class="label label-warning"></span></td>
						</tr>
						<tr>
							<td class="info">test</td>
							<td><div id="htmlStrTemp"></div></td>
						</tr>
						<tr>
							<td class="info">请求参数</td>
							<td>
								<ul class="nav nav-secondary gray">
									<li class="active"><a data-tab href="#docRequestParam">说明</a></li>
									<li><a data-tab href="#docRequestExample">例子</a></li>
									<!-- <i class="icon icon-info-sign" title='例：@ApiModelProperty(value="用户ID", example = "9527")，将example填入对象值里面'></i> -->
								</ul>
								<div class="tab-content">
									<div class="tab-pane tab-param-type-pane active" id="docRequestParam">
										<table class="table table-bordered">
											<thead>
												<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
											</thead>
											<tbody></tbody>
										</table>
									</div>
									<div class="tab-pane tab-param-type-pane" id="docRequestExample">
										<table class="table table-bordered">
											<thead>
												<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
											</thead>
											<tbody></tbody>
										</table>
									</div>
								</div>
							</td>
						</tr>
						<tr>
							<td class="info">响应Model</td>
							<td>
								<ul class="nav nav-secondary gray">
									<li class="active"><a data-tab href="#docResponseModel">说明</a></li>
									<li><a data-tab href="#docResponseExample">例子</a></li>
								</ul>
								<div class="tab-content">
									<div class="tab-pane tab-param-type-pane active" id="docResponseModel">
										<table class="table table-bordered">
											<thead>
												<tr><th>状态码</th><th>说明</th></tr>
											</thead>
											<tbody></tbody>
										</table>
									</div>
									<div class="tab-pane tab-param-type-pane" id="docResponseExample">
										<table class="table table-bordered">
											<thead>
												<tr><th>状态码</th><th>说明</th></tr>
											</thead>
											<tbody></tbody>
										</table>
									</div>
								</div>
							</td>
						</tr>
					</table>
				</div>
				<div class="tab-pane tab-document-pane" id="tabOnlineDebug">
					<div class="post-url-box">
						<div class="input-group">
							<!-- <div class="input-group-btn">
								<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
									<span class="options">参数模板</span> <span class="caret"></span>
								</button>
								<ul class="dropdown-menu pull-left" role="menu">
									<li><a href="javascript:void(0)">默认参数</a></li>
									<li><a href="javascript:void(0);" class="save-request-template">+保存模板</a></li>
								</ul>
							</div> -->
							<div class="input-group-btn" id="debugRequstType">
								<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
									<span class="options">GET</span> <span class="caret"></span>
								</button>
								<ul class="dropdown-menu pull-left" role="menu">
									<li><a href="javascript:void(0);">GET</a></li>
									<li><a href="javascript:void(0);">POST</a></li>
									<li><a href="javascript:void(0);">PUT</a></li>
									<li><a href="javascript:void(0);">HEAD</a></li>
									<li><a href="javascript:void(0);">PATCH</a></li>
									<li><a href="javascript:void(0);">DELETE</a></li>
									<li><a href="javascript:void(0);">OPTIONS</a></li>
									<li><a href="javascript:void(0);">TRACE</a></li>
								</ul>
							</div>
							<input type="text" class="form-control" id="postUrlInput" placeholder="请求的完整地址">
							<span class="input-group-btn">
								<button class="btn btn-default send-request" type="button">发送请求 <i class="icon icon-spin icon-spinner-snake hide"></i></button>
							</span>
						</div>
					</div>
					<div class="param-response-box">
						<div class="param-box">
							<div class="panel panel-default">
								<div class="panel-heading" id="headingOne">
									<h4 class="panel-title">
										<a data-toggle="collapse" href="#tabParamHeader">请求头</a>
										<label><input type="checkbox" id="bulkEditHeaderCheck" value="1"> 批量编辑</label>
									</h4>
								</div>
								<div id="tabParamHeader" class="panel-collapse collapse in">
									<form id="requestHeaderForm">
										<table class="table table-bordered param-table">
											<tbody>
												<tr class="base">
													<td><input type="text" class="form-control" name="paramName" placeholder=""></td>
													<td><input type="text" class="form-control" name="paramValue" placeholder=""></td>
													<td><i class="icon-times"></i></td>
												</tr>
											</tbody>
										</table>
										<textarea class="hide form-control" id="bulkEditHeader" rows="6" placeholder="批量编辑请求头，使用英文冒号分隔，例：&#13;&#10;key:value&#13;&#10;key:value"></textarea>
									</form>
								</div>
							</div>
							<div class="panel panel-default">
								<div class="panel-heading">
									<h4 class="panel-title">
										<a data-toggle="collapse" href="#tabParamBody">请求参数</a>
									</h4>
								</div>
								<div id="tabParamBody" class="panel-collapse collapse in">
									<form id="requestParamForm">
										<ul class="nav nav-secondary">
											<li class="active"><a data-tab href="#tabParamTypeForm">表单</a></li>
											<li><a data-tab href="#tabParamTypeBody">数据流</a></li>
											<li class="form-to-url"><label><input type="checkbox" name="formToUrl" value="1"> 参数拼在URL后面发送</label></li>
											<li class="form-to-url"><label><input type="checkbox" id="bulkEditFormCheck" value="1"> 批量编辑</label></li>
										</ul>
										<div class="tab-content">
											<div class="tab-pane tab-param-type-pane active" id="tabParamTypeForm">
												<table class="table table-bordered param-table">
													<tbody>
														<tr class="base">
															<td><input type="text" class="form-control" name="paramName" placeholder=""></td>
															<td><input type="text" class="form-control" name="paramValue" placeholder=""></td>
															<td><i class="icon-times"></i></td>
														</tr>
													</tbody>
												</table>
												<textarea class="hide form-control" id="bulkEditForm" rows="6" placeholder="批量编辑表单参数，使用英文冒号分隔，例：&#13;&#10;key:value&#13;&#10;key:value"></textarea>
											</div>
											<div class="tab-pane tab-param-type-pane" id="tabParamTypeBody">
												<textarea class="form-control" name="paramBody" rows="6" placeholder=""></textarea>
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
						<div class="response-box">
							<ul class="nav nav-secondary">
								<li class="info"><span>结果集</span></li>
								<li class="active"><a data-tab href="#tabResponseBody">Body</a></li>
								<li class="local-storage"><a data-tab href="#tabResponseCookie">Cookie</a></li>
								<li><a data-tab href="#tabResponseHeader">Header</a></li>
								<li class="right"><span>状态：<i id="httpRequestStatus">200</i>，耗时：<i id="httpRequestTime">0ms</i></span></li>
							</ul>
							<div class="tab-content">
								<div class="tab-pane tab-response-pane active" id="tabResponseBody">
									<!-- <textarea class="form-control" id="responseBodyTextArea" rows="20" placeholder=""></textarea> -->
									<div id="responseBodyJsonDiv"></div>
								</div>
								<div class="tab-pane tab-response-pane" id="tabResponseCookie">
									<table class="table table-bordered param-table">
										<thead>
											<tr>
												<th>名字</th>
												<th>值</th>
											</tr>
										</thead>
										<tbody></tbody>
									</table>
								</div>
								<div class="tab-pane tab-response-pane" id="tabResponseHeader">
									<table class="table table-bordered param-table">
										<thead>
											<tr>
												<th>名字</th>
												<th>值</th>
											</tr>
										</thead>
										<tbody></tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="tab-pane tab-document-pane" id="tabSimulationResult">
					<table class="table table-bordered doc-table">
						<tr>
							<td class="info">接口地址</td>
							<td><span id="simulationResultUrl" class="label label-warning"></span></td>
						</tr>
						<tr>
							<td class="info">测试地址</td>
							<td><a id="simulationResultUrlTest" href="" target="_blank"></a>　<i class="icon icon-info-sign" title='需要被访问项目导入swagger-mg-ui包才能使用'></i></td>
						</tr>
						<tr>
							<td class="info">返回内容</td>
							<td><textarea id="simulationResultText" class="form-control" rows="10"></textarea></td>
						</tr>
						<tr>
							<td class="info">操作</td>
							<td>
								<button type="button" class="btn btn-primary" id="simulationResultSubmit">提交模拟返回值</button>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</div>
	<!-- 增加文档弹出框 -->
	<div class="modal fade" id="addNewDocumentModal">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
					</button>
					<h4 class="modal-title">输入文档地址</h4>
				</div>
				<div class="modal-body">
					<input id="addNewDocumentInput" type="text" class="form-control" placeholder="例：http://192.168.0.172/swagger-resources">
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" id="addNewDocumentBtn">保存</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 导出文档 -->
	<div class="modal fade" id="exportDocumentModal">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
					</button>
					<h4 class="modal-title">导出文档</h4>
				</div>
				<div class="modal-body">
					<div class="alert alert-danger hidden">
						1、请到 <a target="_blank" href="https://gitee.com/zyplayer/swagger-mg-ui">源码处下载</a>《对外文档模板.zip》解压<br/>
						2、复制以下文本内容覆盖至 /js/mg-ui-data.js 文件内<br/>
						3、然后双击打开目录下的：document.html 即可看到导出的文档
					</div>
					<div class="modal-table-box">
						<ul id="exportDocumentUl" class="choise"></ul>
						<textarea id="exportDocumentText" class="form-control hidden"></textarea>
					</div>
					<div align="center" class="bottom-box">
						<button class="btn btn-primary" type="button" id="doExportBtn">确认导出</button>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 导出配置 -->
	<div class="modal fade" id="exportSettingModal">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
					</button>
					<h4 class="modal-title">导出配置</h4>
				</div>
				<div class="modal-body">
					<textarea id="exportSettingText" class="form-control"></textarea>
				</div>
			</div>
		</div>
	</div>
	<!-- 导入配置 -->
	<div class="modal fade" id="importSettingModal">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
					</button>
					<h4 class="modal-title">导入配置</h4>
				</div>
				<div class="modal-body">
					<textarea id="importSettingText" class="form-control"></textarea>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" id="importSettingBtn">确定</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 选择展示的项目 -->
	<div class="modal fade" id="choiseDocModal">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h4 class="modal-title">选择需要展示的文档</h4>
				</div>
				<div class="modal-body">
					<div class="alert alert-danger">不选择则展示全部，展示接口过多会影响效率，建议只展示想看的文档</div>
					<div class="modal-table-box">
						<ul id="choiseDocListUl" class="choise"></ul>
					</div>
					<div align="center" class="bottom-box">
						<button type="button" class="btn btn-primary" id="choiseDocBtn">　　确定　　</button>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="webjars/mg-ui/js/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="webjars/zui/js/zui.min.js"></script>
<script type="text/javascript" src="webjars/zui/lib/dashboard/zui.dashboard.min.js"></script>

<!-- 
<script type="text/javascript" src="webjars/mg-ui/js/mg-ui.min.js"></script>
 -->
<script type="text/javascript" src="webjars/mg-ui/js/formatjson.js"></script>
<script type="text/javascript" src="webjars/mg-ui/js/toast.js"></script>
<script type="text/javascript" src="webjars/mg-ui/js/common.js"></script>
<script type="text/javascript" src="webjars/mg-ui/js/mgResizeble.js"></script>
<script type="text/javascript" src="webjars/mg-ui/js/mg-ui-tree.js"></script>
<script type="text/javascript" src="webjars/mg-ui/js/mg-ui-tag.js"></script>
<script type="text/javascript" src="webjars/mg-ui/js/mg-ui-debug.js"></script>
<script type="text/javascript" src="webjars/mg-ui/js/mg-ui.js"></script>
</html>

